#include<stdio.h>
int main(){
    int T,n,m,flag,cha,a[1001];
    int i,i1,i2;
    scanf("%d",&T);
    for(i=1;i<=T;i++)
    {
        scanf("%d%d",&n,&m);
        for(i1=1;i1<=n;i1++)
        scanf("%d",&a[i1]);
        for(i1=1;i1<=m;i1++)
        {
            scanf("%d",&flag);
            cha=a[flag];
            for(i2=flag;i2>1;i2--)
            a[i2]=a[i2-1];
            a[1]=cha;
            // printf("\n");
            // for(i2=1;i2<=n;i2++)
            // printf("%3d",a[i2]);
            // printf("\n");
        }
        flag=1;
        for(i1=2;i1<=n;i1++)
        if(a[i1]<a[i1-1])
        {
            printf("mayi is a good teacher\n");
            flag=0;
            break;
        }
        if(flag==1)printf("I love C programming language\n");
    }
    return 0;
}